/**
 * 材质基础属性 
 */

import { Descriptions } from "antd";
import { MeshPhongMaterial } from "three";
import ColorItem from "./items/ColorItem";
import MapItem from "./items/MapItem";
import EditMaterial from "../../";

export default function MeshPhongMaterialProperties() {

    const controller = EditMaterial.useController();

    const isShow = controller.useMemo(s => s.material instanceof MeshPhongMaterial, []);

    if (!isShow) return <></>;

    return (
        <Descriptions bordered column={1} size="small" >
            <Descriptions.Item label="颜色" labelStyle={{ width: 50 }} >
                <ColorItem />{/* 颜色 */}
            </Descriptions.Item>

            <Descriptions.Item label="贴图" >
                <MapItem />{/* 贴图 */}
            </Descriptions.Item>
        </Descriptions>
    )
}